From: Fatih Acar Date: Mon, 30 Jan 2017 14:33:18 +0000 (+0100) Subject: xl: Fix assertion on domain reboot with new configuration X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2863^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=dd75ed5c14704862b547412086cde5dcc671997e;p=xen.git xl: Fix assertion on domain reboot with new configuration libxl_domain_build_info_dispose is not resetting the type field to LIBXL_DOMAIN_TYPE_INVALID. Instead, it is memseting the struct to 0 thus when libxl_domain_build_info_init_type is called after a dispose on the same struct, an assertion is triggered because type != LIBXL_DOMAIN_TYPE_INVALID. Calling libxl_domain_build_info_init makes sure the type field is correctly initialized. Signed-off-by: Fatih Acar Signed-off-by: Nikita Kozlov Signed-off-by: Vincent Legout Signed-off-by: Baptiste Daroussin Acked-by: Wei Liu --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 7e8a8ae5c4..196b8a6851 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -2535,6 +2535,7 @@ static void reload_domain_config(uint32_t domid, if (t_len > 0) { LOG("\"xl\" configuration found, using it\n"); libxl_domain_config_dispose(d_config); + libxl_domain_config_init(d_config); parse_config_data("", (const char *)t_data, t_len, d_config); free(t_data);